import 'package:fig/sqlite/sql_manager.dart';
import 'package:sqflite_common/sqlite_api.dart';

class TableMediaTag extends TableBase {
  // 表名
  final String tableName = 'media_tag';
  static final String columnName = "name";

  @override
  createTable(Database db) {
    db.execute('''create table $tableName (
    ${TableBase.columnId} integer PRIMARY KEY AUTOINCREMENT NOT NULL,
    $columnName text,
    ${TableBase.columnCreateTime} integer
    )''');
  }
}

class TableMediaTagMap extends TableBase {
  // 表名
  final String tableName = 'media_tag_map';
  static final String columnTagId = "tag_id";
  static final String columnMediaId = "media_id";

  @override
  createTable(Database db) {
    db.execute('''create table $tableName (
    ${TableBase.columnId} integer PRIMARY KEY AUTOINCREMENT NOT NULL,
    $columnTagId integer,
    $columnMediaId integer,
    ${TableBase.columnCreateTime} integer
    )''');
  }
}
